package com.example.room.table

import androidx.room.TypeConverter
import com.blankj.utilcode.util.GsonUtils

class CustomTypeConverters {
    @TypeConverter
    fun arrayListToString(list: ArrayList<String>):String{
        return GsonUtils.toJson(list)
    }
    fun stringToArrayList(json:String):ArrayList<String>{
        return GsonUtils.fromJson(json,ArrayList::class.java) as ArrayList<String>
    }
}